#define _CRT_SECURE_NO_WARNINGS 1
#include<cstdio>
#include<iostream>
using namespace std;
void my_swap(int* a, int* b) {
	int temp = *a;
	*a = *b;
	*b = temp;
}
void my_swap_s(int& a, int& b) {
	int temp = a;
	a = b;
	b = temp;
}
int main() {
	int a = 10;
	int b = 2;
	my_swap(&a, &b);
	printf("%d %d\n", a, b);
	my_swap_s(a, b);
	printf("%d %d\n", a, b);
	return 0;
}